<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			/*var  regExp = /模式匹配/修饰符*/
			var regExp = /red/gi;
			//调用Test判断字符串是否匹配
			var str = "hello,world";
			var flag = regExp.test(str);
			console.log(flag);
			//调用String对象的match方法
			var flag2 = str.match(regExp);
			console.log(flag2);
		</script>
	</head>
	<body>
	</body>
</html>
